//author:jxx
//此处是对表单的方法，组件，权限操作按钮等进行任意扩展(方法扩展可参照SellOrder.js)
import gridHader from '../../views/mall/ClosingReport/WorkFlowGridHeader.vue'
import Mall_campsitemBox from "../../views/mall/Mall_campsitemBox.vue"
let extension = {
    components: {//动态扩充组件或组件路径
        //表单header、content、footer对应位置扩充的组件
        gridHeader: Mall_campsitemBox,//{ template: "<div>扩展组xx件</div>" },
        gridBody: gridHader,
        gridFooter: '',
        //弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
        modelHeader: '',
        modelBody: '',
        modelFooter: ''
    },
    buttons: {
        view: [
            {
                name: "配置",
                icon: 'md-create',
                value: 'Configuration',
                class: '',
                type: 'error',
                index: 1,//显示的位置
                onClick: function (row) {
                    this.$refs.gridBody.open(row);
                }
            }
        ], box: [], detail: []
    },//扩展的按钮
    methods: {//事件扩展
        onInit () {
            this.ck = false
            this.$store.getters.data().viewPageTest = this;
            this.columns.push({
                title: '操作',
                fixed: 'right',
                width: 140,
                render: (h, { row, column, index }) => {
                    return h(
                        "div", { style: {} }, [
                        h(
                            "a", {
                            props: {},
                            style: {},
                            on: {
                                click: (e) => {
                                    this.$refs.gridHeader.openModel9(row)
                                }
                            }
                        }, "管理"),
                    ])
                }
            })
        },
        rowClick ({ row, column, event }) {
            //查询界面点击行事件
            // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
            this.$refs.table.$refs.table.toggleRowSelection(row);
        },
    }
};
export default extension;